Repository navigation
feat(scan): Support split and parallel scans - Part-3: lazy split and group planning - #1113
Merged
Merged
Conversation
kamcheungting-db
force-pushed
the
feat/file-scan-task-groups
branch
from
November 11, 2026 16:27
fa8ac0a to
79e66ba
Compare
wgtmac
reviewed
Nov 22, 2026
wgtmac
force-pushed
the
feat/file-scan-task-groups
branch
from
November 22, 2026 15:26
9241812 to
8a750fa
Compare
wgtmac
approved these changes
Nov 22, 2026
wgtmac
left a comment
Member
There was a problem hiding this comment.
Overall it looks good to me. I pushed a fix for one case where returning a group could drop the remaining splits of the current file. I also aligned the fallback with Java: when manifest offsets are missing or unusable, large Parquet files use target-sized byte ranges and small files stay whole. The reader already assigns row groups to those ranges, so we could remove the planner’s footer reads and split-policy registry.
This was referenced Nov 23, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Adds task-group planning for parallel scans, on top of the byte ranges from #976 and the range-aware Parquet reads from #1002:
DataTableScan::PlanTasksStream()— lazy, fallible stream ofFileScanTaskGroupDataTableScan::PlanTasks()— the same, collected into a vectorEligible Parquet files are split into byte ranges, and the tasks are packed into groups of roughly
read.split.target-sizebytes.How it works
Packing — follows Java Iceberg’s first-fit and eviction rules:
max(range bytes + delete content bytes, (1 + delete files) * open-file-cost); a deletion vector counts its blob size, not its container file sizeplanning-lookbackgroups stay open; when a new one opens, the largest open group is closed firstFiles that stay whole: files at or below the target size, non-Parquet files, and Parquet files whose valid manifest offsets yield only one range.
Settings
read.split.target-sizeread.split.planning-lookbackread.split.open-file-costMalformed or invalid values fail planning before any planning work starts.
Stream behavior
Single pass, lazy, owns the underlying task stream and its metrics, and can outlive the scan. An executor set with
PlanWith()is borrowed and must stay alive until the group stream is destroyed. Destroying the stream mid-consumption releases all planning resources. The stream retains the current file’s remaining splits across calls toNext(). Splitting requires no data-file I/O or Parquet bundle registration.Tests
table_test(core-only, includesScanTaskPlanningTest): split coverage and merging, delete files and residual filters carried into every split, mixed Parquet/Avro groups, the Java weight formula, group packing (first fit, lookback, 1,024 cap, oversized singleton), settings precedence and errors, incremental consumption, early destruction.scan_test, across manifest format versions: split offsets used with no footer read (the file path does not exist), fixed-size ranges for missing or invalid offsets, files at or below target stay whole, every row read exactly once across splits, scan option beats table property, no-snapshot scans, delete files carried into every split.pre-commitis clean.Related
Part 1 #976 · Part 2a #1002 · Part 2b #1062 · Part 2c #1065. The bounded parallel reader and end-to-end validation follow in later parts.